home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b14 / MyListSTARProcess.c < prev    next >
Text File  |  1996-04-11  |  2KB  |  83 lines

  1. /*****
  2.  *
  3.  *    Grant's CGI Shell (Common Grant Interface :-)
  4.  *        http://arpp.carleton.ca/grant/mac/grantscgi/
  5.  *
  6.  *    MyListSTARProcess.c
  7.  *
  8.  *    Application framework for CGIs and ListSTAR events.
  9.  *
  10.  *    CustomListSTARProcess is where you will do your application specific processing
  11.  *  of the ListSTAR event.
  12.  *
  13.  *    Modify this file.
  14.  *
  15.  *    by Grant Neufeld
  16.  *
  17.  *    Copyright ©1995,1996 by Grant Neufeld
  18.  *
  19.  *    http://arpp.carleton.ca/grant/
  20.  *    gneufeld@ccs.carleton.ca
  21.  *    grant@acm.org
  22.  *
  23.  *    This source may be freely used as long as the copyright notice is kept in the source.
  24.  *    I ask that you let me know of any enhancements (read: bug fixes) to this code.
  25.  *    I would also like copies of (or discounts on) anything you produce using this code, please.
  26.  *
  27.  *****/
  28.  
  29. #include "MyConfiguration.h"
  30. #if kCompileWithListSTARCode
  31.  
  32. #include <string.h>
  33. #include <Threads.h>
  34.  
  35. #include "compiler_stuff.h"
  36. #include "globals.h"
  37.  
  38. #include "ListSTAR.h"
  39. #include "ProcessUtil.h"
  40.         
  41.  
  42. /***  CUSTOM LISTSTAR EVENT FUNCTION  ***/
  43.  
  44. /* This function is where the ListSTAR event is actually processed.
  45.     You should replace its contents with your own.
  46.     (*theLStarHdl)->triggerValue should be positive if the event matches
  47.         your trigger requirements, zero if it doesn't, and negative if an
  48.         error occurred.
  49.     
  50.     (this function's prototype is defined in ListSTAR.h) */
  51. void
  52. CustomListSTARProcess ( LStarHdl theLStarHdl )
  53. {
  54.     /* This example doesn't really do anything.
  55.         If used as a trigger, it always returns success */
  56.     *((*theLStarHdl)->triggerValue) = Trigger_success;
  57.     
  58.     /* you should try to make use of giving time,
  59.         especially in for and while loops or where you have to wait for
  60.         some other process to return data or finish a task. */
  61.     ProcessGiveTime ( nil );
  62. } /* CustomListSTARProcess */
  63.  
  64.  
  65. /***  CUSTOM LISTSTAR EVENT INITIALIZATION  ***/
  66. #pragma segment Startup
  67.  
  68. /* Put any of the initialization you need done, here.
  69.     This function will be called once: in-between the startup
  70.     sequence and the main event loop.
  71.     Return true if the initialization was successful, otherwise false.
  72.     An initialization failure will result in the application quitting. */
  73. Boolean
  74. MyListSTARStartup ( void )
  75. {
  76.     return true;
  77. } /* MyListSTARStartup */
  78.  
  79.  
  80. #endif    /* kCompileWithListSTARCode */
  81.  
  82. /*** EOF ***/
  83.